package com.atguigu04.override;

/**
 * ClassName: Person
 * Package: com.atguigu04.override
 * Description:
 *
 * @Author 姜
 * @Create 2023/11/21 16:07
 * @Version 1.0
 */
public class Person {
    // 属性
    String name;
    private int age;

    // 方法
    public void eat() {
        System.out.println("吃饭");
    }

    public void sleep() {
        System.out.println("睡觉");
    }

    public void show() {
        System.out.println("age : " + age);
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
